home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved.
- *
- * StdFBShared.h - Definitions of objects and types shared between kernel
- * level StdFB driver and PostScript level driver.
- *
- * HISTORY
- * 03 Sep 92 Joe Pasqua
- * Created.
- */
-
- #import <mach/boolean.h>
-
- #if !defined(__Bounds__) && !defined(BINTREE_H)
- #define __Bounds__
- typedef struct { short minx, maxx, miny, maxy; } Bounds;
- #endif
- #if !defined(__Point__) && !defined(BINTREE_H)
- #define __Point__
- typedef struct { short x, y; } Point;
- #endif
-
- //
- // Cursor and Window Server state data, occupying a slice of shared memory
- // between the kernel and WindowServer.
- //
-
- #define CURSORWIDTH 16 /* width in pixels */
- #define CURSORHEIGHT 16 /* height in pixels */
-
- struct bm12Cursor {
- unsigned int image[4][16];
- unsigned int mask[4][16];
- unsigned int save[16];
- };
-
- struct bm18Cursor {
- unsigned char image[4][256];
- unsigned char mask[4][256];
- unsigned char save[256];
- };
-
- struct bm34Cursor {
- unsigned short image[4][256];
- unsigned short save[256];
- };
-
- struct bm38Cursor {
- unsigned int image[4][256];
- unsigned int save[256];
- };
-
- typedef struct {
- int frame;
- ev_lock_data_t cursorSema;
- char cursorShow;
- char cursorObscured;
- char shieldFlag;
- char shielded;
- Bounds saveRect;
- Bounds shieldRect;
- Point cursorLoc;
- Bounds cursorRect;
- Bounds oldCursorRect;
- Bounds screenBounds;
- Point hotSpot[4];
- union {
- struct bm12Cursor bw;
- struct bm18Cursor bw8;
- struct bm34Cursor rgb;
- struct bm38Cursor rgb24;
- } cursor;
- } StdFBShmem_t;
-
-
- //
- // Get/Set parameters for the StdFB device. These include support
- // for getting the frame buffer parameters, registering the frame buffer
- // with the event system, and returning the registration token.
- //
- /* Valid parameters for getParameterInt */
- #define STDFB_FB_DIMENSIONS "IO_Framebuffer_Dimensions"
- typedef enum {
- STDFB_FB_WIDTH,
- STDFB_FB_HEIGHT,
- STDFB_FB_ROWBYTES,
- STDFB_FB_BITS_PER_PIXEL,
- STDFB_FB_FLAGS
- } kmFbDimensionIndices;
- #define STDFB_FB_DIMENSIONS_SIZE (STDFB_FB_FLAGS + 1)
-
- #define STDFB_FB_REGISTER "IO_Framebuffer_Register"
- #define STDFB_FB_REGISTER_SIZE 1
-
- /* Valid parameters for setParameterInt */
- #define STDFB_FB_UNREGISTER "IO_Framebuffer_Unregister"
- #define STDFB_FB_UNREGISTER_SIZE 1
-
- #define STDFB_FB_MAP "IO_Framebuffer_Map"
- #define STDFB_FB_MAP_SIZE 1
-
- #define STDFB_FB_UNMAP "IO_Framebuffer_Unmap"
- #define STDFB_FB_UNMAP_SIZE 1
-
- /* Valid parameters for setParameterChar */
- #define STDFB_4BPS_TO_5BPS_MAP "IO_4BPS_to_5BPS_map"
- #define STDFB_4BPS_TO_5BPS_MAP_SIZE 16
-
- #define STDFB_5BPS_TO_4BPS_MAP "IO_5BPS_to_4BPS_map"
- #define STDFB_5BPS_TO_4BPS_MAP_SIZE 32
-
-